package com.bwie.system.controller;

import com.bwie.common.domain.pojo.User;
import com.bwie.common.result.Result;
import com.bwie.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Gd
 * @package: com.bwie.system.controller
 * @Project: zg5_goods
 * @Name: SystemController
 * @Date: 2024/4/29 16:23
 */
@RestController
public class SystemController {

    @Autowired
    private SystemService systemService;

    /**
     * 根据用户名查询用户信息
     * @param useName
     * @return
     */
    @GetMapping("findByName/{useName}")
    public Result<User> findByName(@PathVariable String useName){
        User user = systemService.findByName(useName);
        return Result.success(user);
    }
}
